import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    component: () => import('@/views/Dashboard.vue'),
    redirect: '/monitor',
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/Home.vue')
      },
      {
        path: '/monitor',
        name: 'Monitor',
        component: () => import('@/views/monitor/Dashboard.vue')
      },
      {
        path: '/agent',
        name: 'AgentList',
        component: () => import('@/views/agent/AgentList.vue')
      },
      {
        path: '/task',
        name: 'TaskList',
        component: () => import('@/views/task/TaskList.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
